Conversation
bjarthur
marked this pull request as ready for review
July 24, 2026 12:37
Author
Author
|
should probably wait to merge this until zstd compression is sorted out. see JuliaGeo/NCDatasets.jl#317 |
The extension read and wrote through NCDatasets' CFVariable, so the CF
decoding (scale_factor, add_offset, fill values, time units) was applied
twice: once by NCDatasets and again by YAXArrays' CFDiskArray/timedecode.
A variable with scale_factor 0.5 and add_offset 100 came back as 150.5
instead of 101, and a "days since" time axis got a corrupt element type.
Wrap the raw Variable (nc[name].var) instead, as the NetCDF.jl backend
does, and copy _FillValue into missing_value so YAXArrays honours it.
Also:
- forward haschunks/eachchunk to the file (they were imported but never
defined, so every handle fell back to a single whole-array chunk)
- iscompressed recognises Zstandard when NCDatasets provides zstandard()
- open_dataset_handle no longer masks a failed open with close(nothing)
- add_var passes deflate/zstd keywords only when requested, so zstdlevel
never reaches a defVar that does not know it
- allow_missings is false: defVar wants a DataType, and YAXArrays handles
Union{Missing,T} through missing_value as for NetCDF.jl
- NCDatasets compat is "0.14"; 0.12 predates the DiskArrays integration
- tests: chunking, failed-open and raw-value/attribute round trip
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
given that NetCDF.jl is no longer maintained...